<!DOCTYPE html>
<html>
<head>
    <title>个人中心</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta name="description" content="">

    <link rel="stylesheet" href="/lib/weui.min.css">
    <link rel="stylesheet" href="/css/jquery-weui.css">
    <link rel="stylesheet" href="/css/home.css">
    <link rel="stylesheet" href="/plugins/fontaw/css/font-awesome.css">
<style>
    .weui-flex{font-size:0.8rem}
    .link-zone a{color: grey}
    .doctor-info{position: relative;padding: 10px}
    #doctorInfo p{padding:2px 0px}
    .avatar{width: 60px;margin-left: 10px}
    .avatar-img{border-radius: 50%}
    .info-block{-webkit-box-flex: 1;display: inline-block}
.max-width{max-width:50%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
    .weui-cell__bd h4{display: inline-flex;padding-left:0.5rem;font-size: 0.8rem}
    .link-zone i{color: green}
</style>

<body>
<div class="weui-flex">
    <div class="weui-flex__item">
        <div class="doctor-info" id="patientInfo" >
            <!--<a href="#" class=" weui-cell_access ">
                <div class="info-block avatar">
                    <img class="avatar-img" src="/mod-page/images/avatar3.jpg" alt="" width="50px">
                </div>
                <div class="info-block" >
                    <h3 class="weui-media-box__title">江户川</h3>
                    <p class="weui-media-box__desc" ><i class="fa fa-wechat" aria-hidden="true"></i> 张三丰 的猫 神经</p>
                    <p class="weui-media-box__desc" ><i class="fa fa-phone-square" aria-hidden="true"></i> 13748558999</p>
                    <a href="/mod-page/patient/patient_info.html"><span class="panel-title-right mid-text"><i class="fa fa-clipboard" aria-hidden="true"></i> 修改信息</span></a>
                </div>
            </a>-->
        </div>
    </div>
</div>

<div class="kk-block-list">
    <div class="kk-block">
        <div class="kk-block-head">
            <h4><i class="fa fa-edit" aria-hidden="true" style="color: darkgreen"></i> 方 案 </h4>
        </div>
        <div class="kk-block-body">
            <p><span>患者：</span>kriss,男，43岁</p>
            <p><span>病、症名：</span>感冒</p>
            <p><span>方案补充收费：</span>50.0</p>
            <p><span>处方：</span>颗粒剂，当归等</p>
            <p><span>贴数：</span>5贴</p>
            <p><span>开方时间：</span>2018-04-14 12:23</p>
        </div>
        <div class="kk-block-foot" style="text-align: center">
            <span class="tiny-text">点击查看详情</span>
        </div>
    </div>
</div>

<script src="/lib/jquery-2.1.4.js"></script>
<script src="/lib/fastclick.js"></script>
<script src="/js/home.js"></script>
<script src="/js/jquery-weui.js"></script>
<script>
    $(function(){

        var patientId = getQueryString("patientId");
                $.ajax({
                            url:"/patient/getPatientById",
                            type:"post",
                            dataType:"json",
                            data:{"patientId":patientId},
                    success:function(result){
                            console.log("ajax成功");
                            var patientInfo = "";

                                    patientInfo += "<a href='#' class=' weui-cell_access '>"+
                                            "<div class='info-block avatar'>"+
                                            "<img class='avatar-img' src='"+result.data.patientPicPath+"' alt='' width='50px'>"+
                                            "</div><div class='info-block' >"+
                                            "<h3 class='weui-media-box__title'>"+result.data.patientname+"&nbsp;&nbsp;"+result.data.age+"岁</h3>";
                            if(result.data.nickName != null){
                                    patientInfo +="<p class='weui-media-box__desc' ><i class='fa fa-wechat' aria-hidden='true'></i>"+result.data.nickName+"</p>";
                                }
                            patientInfo += "<p class='weui-media-box__desc' ><i class='fa fa-phone-square' aria-hidden='true'></i>"+result.data.phone+"</p>"+
                                    "<a href='/mod-page/patient/patient_info.html'><span class='panel-title-right mid-text'><i class='fa fa-clipboard' aria-hidden='true'></i> 修改信息</span></a>";
                            patientInfo += "</div>";
                            patientInfo += "</a>";


                                            $("#patientInfo").html(patientInfo);
                        },error:function(){
                            console.log("ajax出错");
                        }
                });
            });
    </script>
</body>
</html>
